<?php
namespace app\index\controller;

use app\common\controller\Common;
use think\Controller;
use think\Db;

class Index extends Common
{
    public function index()
    {
       //查找标签数据
       $tagsData =Db::table('wb_tag')->select();
       //查找内容数据
        $contentData=Db::table('wb_userinfo')
            ->join('wb_article','wb_article.uid=wb_userinfo.uid')
            ->join('wb_user','wb_user.uid=wb_userinfo.uid')
            ->select();
//        dd($this->getContentImg($contentData));
       $this->assign('tagsData',$tagsData);
       $this->assign('contentData',$this->getContentImg($contentData));
       return view();
    }
    public function search(){
       $res= $this->searchData();
       echo  $res;
    }
}
